Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Tile Clusters (tree-like hierarchies) #3490

Merged
merged 48 commits into from
Jan 9, 2024
Merged

Support Tile Clusters (tree-like hierarchies) #3490

merged 48 commits into from
Jan 9, 2024

Conversation

jerryz123
Copy link
Contributor

#3238 rebased on latest.

This work substantially refactors the existing Tile/TilePRCIDomain/HasTiles/InstantiatesTiles code into a system that support recursive clusters of tiles.

This PR defines an Element as an abstract node in the hierarchy tree. Elements can be BaseTiles or Clusters, where BaseTiles are leaf nodes in the hierarchy, clusters are non-root nodes, and the BaseSubsystem is the root node.
BaseTile and Cluster will support deduplication.

Notably Clusters support recursive instantiation, a Cluster can contain Tiles or internal Clusters. The Cluster bus topology should be capable of both supporting hierarchical coherence, and the BaseSubsystems topology handle managing all coherence, depending on configuration variables.

This PR still requires more time. Some of the interrupt handling is not satisfying, and some decisions over clock/reset crossing ought to be addressed.

Related issue:

Type of change: bug report | feature request | other enhancement

Impact: no functional change | API addition (no impact on existing code) | API modification

Development Phase: proposal | implementation

Release Notes

Copy link
Member

@sequencer sequencer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for hard working on cluster!
My only concern is the usage of Clone, which I think it should be eventually removed in the future.
We are working on the new HierarchicalCache which will be used for the COH API.
Although this will break my work, but for free to break them, I will rebase them back to dev.

@@ -1,46 +0,0 @@
// See LICENSE.SiFive for license details.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think ClockGroupDriver make sense as well;p
Thanks for removing it.

Comment on lines 46 to 48
val csbus = tlBusWrapperLocationMap(SBUS) // like the sbus in the base subsystem
val ccbus = tlBusWrapperLocationMap(CBUS) // like the cbus in the base subsystem
val cmbus = tlBusWrapperLocationMap.lift(MBUS).getOrElse(csbus)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For each cluster, they should have these buses?
or we can let user directly query bus via location API.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try to remove what I can here.

crossingParams: ElementCrossingParamsLike
) extends CanAttachCluster

case class CloneClusterAttachParams(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically I don't like the current Clone implementation in Diplomacy, which is a little brittle, I think in the future, we can try to remove them and use https://github.com/llvm/circt/blob/8129d5de502a8cd5d861438e99f823babc5cebb0/docs/Dialects/FIRRTL/FIRRTLAnnotations.md?plain=1#L613 to force circt do it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree the implementation of CloneLazyModule is not good right now, but I like the API of CloneLazyModule. I'm not sure what you are envisioning, but I thought the backend implementation of CloneLazyModule could change, while these APIs remain

src/main/scala/subsystem/Element.scala Outdated Show resolved Hide resolved
Comment on lines 40 to 49
class ClusterConfig extends Config(
new WithNBigCores(2, location=InCluster(3)) ++
new WithNBigCores(2, location=InCluster(1)) ++
new WithNBigCores(2, location=InCluster(0)) ++
new WithCluster(3, location=InCluster(2)) ++
new WithCluster(2) ++
new WithCluster(1) ++
new WithCluster(0) ++
new DefaultConfig
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

@jerryz123
Copy link
Contributor Author

@sequencer this is ready.

@sequencer sequencer merged commit 060a761 into dev Jan 9, 2024
25 checks passed
@sequencer sequencer deleted the clusters2 branch January 9, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants